package com.xfcy.blog.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xfcy.blog.common.constant.DateConstant;
import com.xfcy.blog.valid.AddGroup;
import com.xfcy.blog.valid.ListValue;
import com.xfcy.blog.valid.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 晓风残月Lx
 * @date 2023/5/23 18:13
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TagDTO {

    @Null(message = "id应该为空", groups = AddGroup.class)
    @NotNull(message = "id不能为空", groups = UpdateGroup.class)
    private Long id;

    @NotBlank(message = "标签名不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    @ListValue(vals = {0, 1}, groups = {UpdateGroup.class,AddGroup.class})
    private Integer sort;

    @NotNull(message = "点击量不能为空", groups = UpdateGroup.class)
    private Integer clickVolume;


}
